<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns:th="www.thymeleaf.org" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="css/style.css" />
	<link type="text/css" rel="stylesheet" href="css/div-container.css" />
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <![endif]-->    
    <script type="text/javascript" src="js/jquery-1.11.1.min_044d0927.js"></script>
	<script type="text/javascript" src="js/jquery.bxslider_e88acd1b.js"></script>
    
    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>    
        
	<script type="text/javascript" src="js/select.js"></script>
    
	<script type="text/javascript" src="js/lrscroll.js"></script>
    
    <script type="text/javascript" src="js/iban.js"></script>
    <script type="text/javascript" src="js/fban.js"></script>
    <script type="text/javascript" src="js/f_ban.js"></script>
    <script type="text/javascript" src="js/mban.js"></script>
    <script type="text/javascript" src="js/bban.js"></script>
    <script type="text/javascript" src="js/hban.js"></script>
    <script type="text/javascript" src="js/tban.js"></script>
    
	<script type="text/javascript" src="js/lrscroll_1.js"></script>
    
    
<title>尤洪</title>
</head>
<body>  
<!--Begin Header Begin-->
<div class="soubg">
	<div class="sou">
        <span class="fr">
        	<span class="fl">你好，请<a href="Login.html">登录</a>&nbsp; <a href="Regist.html" style="color:#ff4e00;">免费注册</a>&nbsp; </span>
            <span class="fl">|&nbsp;关注我们：</span>
            <span class="s_sh"><a href="#" class="sh1">新浪</a><a href="#" class="sh2">微信</a></span>
            <span class="fr">|&nbsp;<a href="#">手机版&nbsp;<img src="images/s_tel.png" align="absmiddle" /></a></span>
        </span>
    </div>
</div>
<!--End Header End--> 
<!--Begin Login Begin-->
<div class="log_bg">	
    <div class="top">
        <div class="logo"><a href="Index.html"><img src="images/logo.png" /></a></div>
    </div>
	<div class="regist">
    	<div class="log_img"><img src="images/l_img.png" width="611" height="425" /></div>
		<div class="reg_c">
        	<form id="registerNow" action="registNow.do" method="post" onsubmit="return validate1()">
            <table border="0" style="width:420px; font-size:14px; margin-top:20px;" cellspacing="0" cellpadding="0">
              <tr height="50" valign="top">
              	<td width="95">&nbsp;</td>
                <td>
                	<span class="fl" style="font-size:24px;">注册</span>
                    <span class="fr">已有商城账号，<a href="toLogin.do" style="color:#ff4e00;">我要登录</a></span>
                </td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;用户名 &nbsp;</td>
                <td><input type="text" name="trueName" value="" class="l_user" required="required"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;密码 &nbsp;</td>
                <td><input type="password" id="regPwd" name="pwd" value="" class="l_pwd" required="required" autocomplete="new-password"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;确认密码 &nbsp;</td>
                <td><input type="password" id="trueRegPwd" name="truePwd"  onblur="validate()" value="" class="l_pwd" required="required" autocomplete="new-password"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;性别 &nbsp;</td>
                <td><select name="sex" class="regSex" ><option value="2">未知</option><option value="1">男</option><option value="0">女</option></select></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;邮箱 &nbsp;</td>
                <td><input type="email" name="email" value="" class="l_email" required="required"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;手机 &nbsp;</td>
                <td><input type="text" name="tel" value="" class="l_tel" required="required" pattern="^[1][3,4,5,7,8][0-9]{9}$" /></td>
              </tr>
              <tr height="50">
                <td align="right"> <font color="#ff4e00">*</font>&nbsp;验证码 &nbsp;</td>
                <td>
                    <input id="code" placeholder="验证码" type="text" name="loginVerifyCode" value="" class="l_verifyCode" required="required"/>
                    <img onclick="javascript:getvCode()" id="verifyimg" style="margin-left: 20px;"/>
                </td>
              </tr>
              <tr>
              	<td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体';" class="fl">
                    	<label class="r_rad"><input type="checkbox" name="alreadyRead" required="required"/></label><label class="r_txt">我已阅读并接受《用户协议》</label>
                    </span>
                </td>
              </tr>
              <tr style="height:60px;">
              	<td>&nbsp;</td>
                <td><input type="submit" value="立即注册" class="log_btn" /></td>
              </tr>
            </table>
            </form>
        </div>
    </div>
</div>
<!--End Login End--> 
<!--Begin Footer Begin-->
<div class="btmbg">
    <div class="btm">
        备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br />
        <img src="images/b_1.gif" width="98" height="33" /><img src="images/b_2.gif" width="98" height="33" /><img src="images/b_3.gif" width="98" height="33" /><img src="images/b_4.gif" width="98" height="33" /><img src="images/b_5.gif" width="98" height="33" /><img src="images/b_6.gif" width="98" height="33" />
    </div>    	
</div>
<!--End Footer End -->    
<div class="div-container" id="div-container" style="display: none;">
	<div class="div-child-container" >
		<div class="div-child">
			<br /> <br /><br /> <span style="font-size: 35px; font-weight: bold;"></span>
			<div class="my-btn">
				<button class="btn btn-primary" id="confrim" onclick="confrim()">确认</button>
			</div>
		</div>
	</div>
</div>
<div class="div-container" id="div-container1" th:if="${result.sucess==0}" style="display: block;">
	<div class="div-child-container" >
		<div class="div-child">
			<br /> <br /><br /> <span th:text="${result.message}" style="font-size: 35px; font-weight: bold;"></span>
			<div class="my-btn">
				<button class="btn btn-primary" id="confrim" onclick="confrim()">确认</button>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
getvCode();

/**
 * 获取验证码
 * 将验证码写到login.html页面的id = verifyimg 的地方
 */
function getvCode() {
    document.getElementById("verifyimg").src = timestamp("logVerifyCode.do");
}
//为url添加时间戳
function timestamp(url) {
    var getTimestamp = new Date().getTime();
    if (url.indexOf("?") > -1) {
        url = url + "&timestamp=" + getTimestamp
    } else {
        url = url + "?timestamp=" + getTimestamp
    }
    return url;
};

/*将弹出框隐藏*/
function confrim(){
    var container = document.getElementById('div-container');
    container.style.display="none";
    $('#div-container1').css('display','none');
}

// 确认密码
function validate1(){
	var trueRegPwd = $('#trueRegPwd').val();
	var regPwd = $('#regPwd').val();
	if(trueRegPwd!=regPwd){
		var str='<div class="div-child-container"><div class="div-child">'
			+'<br /> <br /><br /> <span style="font-size: 35px; font-weight: bold;">密码不一致</span>'
			+'<div class="my-btn"><button class="btn btn-primary" id="confrim" onclick="confrim()">确认</button>'
			+'</div></div></div>';
		$('#div-container').html(str);
		$('#div-container').css('display','block');
		return false;
	}
	return true;
}
function validate(){
	var trueRegPwd = $('#trueRegPwd').val();
	var regPwd = $('#regPwd').val();
	if(trueRegPwd!=regPwd){
		var str='<div class="div-child-container"><div class="div-child">'
			+'<br /> <br /><br /> <span style="font-size: 35px; font-weight: bold;">密码不一致</span>'
			+'<div class="my-btn"><button class="btn btn-primary" id="confrim" onclick="confrim()">确认</button>'
			+'</div></div></div>';
		$('#div-container').html(str);
		$('#div-container').css('display','block');
	}
}
</script>

<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</body>
</html>
